Skip to content

Prepare Python SDK 3.0.0 with playlist support and uv - #2

Merged
wenbinf merged 3 commits into
mainfrom
fix/python-sdk-sync
Sep 24, 2026
Merged

wenbinf merged 3 commits into
mainfrom
fix/python-sdk-sync

Conversation

@wenbinf

@wenbinf wenbinf commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

The Python SDK cannot currently write playlists, and its handwritten endpoint methods and README can drift from the API contract. Prepare version 3.0.0 with generated methods and examples, all five playlist write operations, and a reproducible uv development workflow.

Changes

  • Add create_playlist, update_playlist, add_playlist_item, delete_playlist_item, and update_playlist_item_notes, preserving existing method names, keyword arguments, and requests.Response returns.
  • Generate endpoint wrappers, a contract snapshot, and marked README sections from the Listen Notes monorepo OpenAPI specification and Python registry. The package and its tests remain standalone.
  • Encode path identifiers, distinguish query and body fields, preserve empty notes/descriptions, and keep each client's configuration isolated.
  • Correct the default user agent to podcast-api-python 3.0.0 while preserving custom overrides.
  • Preserve API error details, map forbidden requests to PermissionDeniedError, translate connection failures/timeouts, and respect max_retries=0. Writes no longer follow redirects or retry ambiguous response failures by default.
  • Require Python 3.10+, update dependencies, and migrate development/build/publication commands to uv with a committed lockfile. Remove Makefile, tox, legacy setup files, and redundant configuration.
  • Keep default tests offline and add 12 opt-in integration tests covering reads, all playlist write operations, response headers, and a missing route against the public mock API. Integration requests use no API key, reject other destinations, and disable redirects. The mock returns fixed responses; these tests do not verify persistence or production authorization.
  • CI runs offline tests on Python 3.10 and 3.14, integration tests in a separate Python 3.14 job, and formatting/lint/packaging once on Python 3.14.

Validation

  • 79 offline tests pass on every Python version from 3.10 through 3.14; 99% coverage. Default runs skip the integration tests.
  • All 12 integration tests pass against listen-api-test.listennotes.com using uv run --locked pytest --run-integration -m integration.
  • Black and Flake8 pass; wheels and source archives build on every supported interpreter.
  • The installed wheel and unpacked source archive independently pass all 79 unit tests outside the monorepo.
  • uv lock regeneration is unchanged, and the package metadata dry run passes without publication.
  • 13 monorepo generator tests, 9 Django documentation tests, and Python/JavaScript generation checks pass.

This prepares the release; publishing to PyPI and enabling the new SDK methods in website snippets remain separate steps.

@wenbinf
wenbinf merged commit fd78aa6 into main Sep 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant